 /**
 * 子模块路由
 * DHpai
 */

var router = function($urlRouterProvider, $stateProvider){

 	$stateProvider


    //资质审核
    .state('app.verify_qualify', {
        url: "/verify/qualify",
        views: {
            'main@' : {
                template : require('./views/enterprise_verify.html'),
                controller : 'enterpriseVerify',
            }
        },
        resolve:{
            type_list : function(verificationservice){
                return verificationservice.type_list();
            },
            enterpriseList : function(verificationservice){
                return verificationservice.qualifyList();
            },
            enterpriseType : function(){
                return '1';
            }
        }
    })

    //财务审核
    .state('app.verify_finance', {
        url: "/verify/finance",
        views: {
            'main@' : {
                template : require('./views/enterprise_verify.html'),
                controller : 'enterpriseVerify',
            }
        },
        resolve:{
            type_list : function(verificationservice){
                return verificationservice.type_list();
            },
            enterpriseList : function(verificationservice){
                return verificationservice.financeList();
            },
            enterpriseType : function(){
                return '2';
            }
        }
    })

    //管理审核
    .state('app.verify_manage', {
        url: "/verify/manage",
        views: {
            'main@' : {
                template : require('./views/enterprise_verify.html'),
                controller : 'enterpriseVerify',
            }
        },
        resolve:{
            type_list : function(verificationservice){
                return verificationservice.type_list();
            },
            enterpriseList : function(verificationservice){
                return verificationservice.manageList();
            },
            enterpriseType : function(){
                return '3';
            }
        }
    })


	;

};

module.exports = router;